<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@include file="he_includePackage.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>


<body>
	<style>
.col-xs-3 {
	padding: 1px;
	height: 750px;
}

.col-xs-9 {
	height: 750px;
}

.container {
	width: 1280px !important;
}

.xs11 {
	margin-top: 20px;
	margin-left: 30px;
}

#xs12 {
	height: 640px;
	width: 313px;
}

#xs13 {
	height: 202px;
	width: 900px
}

#xs11 {
	height: 140px;
}

#xs10 {
	height: 110px;
}

#xs1 {
	height: 100px;
	width: 80px;
}

body {
	font-size: 12px;
}

ul {
	margin: 0;
	padding: 7px;
}

ul li {
	height: 22px;
	vertical-align: bottom;
}

.actived {
	height: 40px;
	border-top: 3px solid #ff9900;;
	border-right: 1px solid #AAC7E9;
	border-left: 1px solid #AAC7E9;
	border-bottom: 1px solid #AAC7E9;
	background: #FFDAB9;
}

.panel-group {
	padding: 1px;
	margin：1px;
}

</style>
<script type="text/javascript" language="javascript">
function g(o){return document.getElementById(o);}
function hoverli(n){
for(var i=1;i<=25;i++){
{g('tb_'+i).className='';}
g('tb_'+n).className='actived';}
var keytime;
}
$(function() {
		keytime = $("#keytime").datagrid({
		url : '<%=request.getContextPath()%>/key',
		title : '论文重要提交时间表',
		resizeable:true,
		pageSize: 5,//每页显示的记录条数，默认为10 
		pageList: [5,10,15],//可以设置每页记录条数的列表 
		pagination : true,
		singleSelect : true,
		sortName : 'keytime_id',
		sortOrder : 'asc',
		rowStyler: function(index,row){
			if(index%2==0){
        		return 'background-color:rgb(230,230,230);height:30px';
    		}
    		else{
	    		return 'height:30px;';

			}
	    },
		fitColumns : true,
		columns : [ [ {
			field : 'keytime_id',
			title : '',
			
			sortable : true,
		}, {
			field : 'keytime_type',
			title : '论文重要提交事件',
			formatter: function(value,row,index){
				if (value=='A'){
					return '论文选题';
				} ;
				if(value=='B'){
					return '论文开题报告提交';
				}
				if(value=='C'){
					return '论文中期检查';
				}
				if(value=='D'){
					return '论文初稿提交';
				};
				if(value=='E'){
					return '论文查重提交';
				}
				if(value=='F'){
					return '论文第一次答辩';
				}
				if(value=='G'){
					return '论文第二次答辩';
				}
				},
		},{
			field : 'keytime_begintime',
			title : '起始时间',
		},{
			field : 'keytime_endtime',
			title : '完成时间',
		},{
			title : '目前状态',
							field : 'teacher_name',
							align : 'center',
							formatter : function(value, row, index) {
								var beginDate=row.keytime_begintime.substring(0,10);  
							 	var endDate=row.keytime_endtime.substring(0,10);  
							 	var now = new Date();

							 	var beginMonth = beginDate.substring(5,7);  
							    var beginDay = beginDate.substring(8);  
							    var beginYear = beginDate.substring(0,4);  
							  
							    var endMonth = endDate.substring(5,7);  
							    var endDay = endDate.substring(8);  
							    var endYear = endDate.substring(0,4);  
							    
							    beginDate=Date.parse(beginMonth+'/'+beginDay+'/'+beginYear);
							    endDate=Date.parse(endMonth+'/'+endDay+'/'+endYear);
							    nowDate=Date.parse(now.getMonth()+'/'+now.getDay()+'/'+now.getFullYear());
							    
								if(now >=beginDate && now<=endDate)  
								{  
									var state="进行中";
									return state;  
								}
								else if(now <=beginDate)
								{
									var state="未开始";
									return state;
								}
								else 
								{
									var state="已完成";
									return state;
								}
								},
		},
		] ],
		});
});
function showWhat()
		{
			var collap=document.getElementById('collapseHelp');
			if(collap.style.display=='none')
				collap.style.display='block';
			else
				collap.style.display='none';
		}
</script>
		<div class="row">
			<div class="col-xs-12  xs11">
				<strong><font size="3">流程管理》查看论文重要提交时间</font>
				</strong>
			</div>
		</div>
		<div class="col-xs-11  xs11">
			<div class="panel panel-default">
				<div class="panel-heading" align="left">
					<a data-toggle="collapse" data-parent="#accordion"
						href="#collapseHelp" class="glyphicon glyphicon-chevron-down" onclick="showWhat()">
						操作指南 </a>
				</div>
				<div id="collapseHelp" class="panel-collapse collapse" >
					<div class="panel-body">
						操作指南 —— 毕业设计重要事件以及时间提醒：
						<ul>
							<li>学生以及指导老师必须严格按照指定的时间限制进行论文流程管理，如有延误，将整体影响到下一个阶段的论文管理工作，请指导老师和学生积极配合</li>
							<br>
							<li>专业人员也需要在指定时间内完成相应的管理工作，审核相关专业论文题目等项目</li>
						</ul>
					</div>
				</div>


				<div class="row">
					<div class="col-xs-11 xs11">
						<br>
						<p>
							<b><font size="3">毕业设计流转状态：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开题阶段
						</p>
						</b></font> <br>
					</div>
					
				</div>
				 <div style="height:auto;">
               		 <table width="100%" id="keytime" >
               		 </table>
                 </div>
			</div>
		</div>
	<!--修改结束-->

</body>
</html>
